-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NULL check in UDPEndPoint Sockets SendMsgImpl #22432
Merged
andy31415
merged 8 commits into
project-chip:master
from
s-mcclain:sockets-sendmsgimpl-nullptr-check
Sep 12, 2022
Merged
NULL check in UDPEndPoint Sockets SendMsgImpl #22432
andy31415
merged 8 commits into
project-chip:master
from
s-mcclain:sockets-sendmsgimpl-nullptr-check
Sep 12, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullapprove
bot
requested review from
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
erjiaqing,
franck-apple,
gjc13,
harimau-qirex,
harsha-rajendran,
hawk248,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jtung-apple,
lazarkov,
LuDuda,
mlepage-google,
mrjerryjohns,
msandstedt and
robszewczyk
September 6, 2022 20:33
PR #22432: Size comparison from e535710 to ccb28cf Increases (20 builds for bl602, cc13x2_26x2, linux, nrfconnect, qpg, telink)
Decreases (5 builds for cc13x2_26x2, esp32, psoc6)
Full report (45 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
tcarmelveilleux
approved these changes
Sep 7, 2022
PR #22432: Size comparison from 33f6a91 to 7466327 Increases (23 builds for bl602, cc13x2_26x2, esp32, linux, mbed, nrfconnect, psoc6, qpg, telink)
Decreases (2 builds for cc13x2_26x2, psoc6)
Full report (45 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
andy31415
reviewed
Sep 7, 2022
Moved msg.IsNull check to beginning of SendMsgImpl
s-mcclain
force-pushed
the
sockets-sendmsgimpl-nullptr-check
branch
from
September 7, 2022 18:50
7466327
to
7b6c891
Compare
PR #22432: Size comparison from 383c416 to 7b6c891 Increases (8 builds for linux, mbed, nrfconnect, telink)
Decreases (2 builds for bl602)
Full report (14 builds for bl602, k32w, linux, mbed, nrfconnect, qpg, telink)
|
bzbarsky-apple
approved these changes
Sep 7, 2022
PR #22432: Size comparison from 383c416 to bfe230f Increases (5 builds for nrfconnect, telink)
Full report (16 builds for cc13x2_26x2, k32w, nrfconnect, qpg, telink)
|
msandstedt
approved these changes
Sep 8, 2022
andy31415
approved these changes
Sep 9, 2022
PR #22432: Size comparison from bf12fce to b1036d6 Increases (6 builds for nrfconnect, qpg, telink)
Full report (16 builds for cc13x2_26x2, k32w, nrfconnect, qpg, telink)
|
PR #22432: Size comparison from e4c075f to 651b07f Increases (15 builds for cc13x2_26x2, esp32, linux, mbed, nrfconnect, psoc6, telink)
Decreases (9 builds for bl602, cc13x2_26x2, efr32, psoc6, qpg)
Full report (35 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
isiu-apple
pushed a commit
to isiu-apple/connectedhomeip
that referenced
this pull request
Sep 16, 2022
* Add IsNull check to UDP Sockets SendMsgImpl prior to ptr dereference. * Update UDPEndPointImplSockets.cpp Moved msg.IsNull check to beginning of SendMsgImpl * Add null check to MinimalMdns Server when calling CloneData * Restyle * Add namespace for PacketBufferHandle Co-authored-by: Andrei Litvin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When CHIP Server sends UDP message to UDPEndPoint, the Server attempts
CloneData()
to clone the buffer for sending to multiple interfaces. In the rare circumstance where CloneData allocation fails, it returns an empty handle where 'this' is NULL. This causes a segmentation fault inside SendMsgImpl where it attempts to deference the empty handle without checking for null first.Change overview
Fixes #22552
Testing
How was this tested? (at least one bullet point required)